package com.project.controller;

import com.project.bean.CountMonthBean;
import com.project.service.ICountMonthSellService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("month")
public class CountMonthController {
    @Autowired
    private ICountMonthSellService monthSellService;

    @RequestMapping("findYear")
    public List<Integer> findYear() {
        return monthSellService.findYear();
    }

    @RequestMapping("findByYear")
    public List<CountMonthBean> findByYear(String year) {
        return monthSellService.findByYear(year);
    }

}
